﻿using MiniFox.Components;
using MiniFox.Platform.File.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.File.Providers
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister]
    public interface IStorageProvider : IFileProvider
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileId"></param>
        /// <returns>返回已经删除的文件数据</returns>
        bool Remove(string fileId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileDatas"></param>
        bool PreSave(FileData[] fileDatas);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileData"></param>
        bool Save(FileData fileData);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileData"></param>
        bool Accept(FileData fileData);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileId"></param>
        /// <returns></returns>
        FileData? LoadPreSave(string fileId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="group"></param>
        /// <param name="fileId"></param>
        /// <param name="newName"></param>
        /// <returns></returns>
        bool Rename(string group, string fileId, string newName);
    }
}
